::::::::::::::::::::::::::::::::::::::::::::::::::::
Ball Animation (program in progress)
'BallAnimation - By Brad Moore
'Placed into the public domain Oct 2004
xchg = -10
ychg = 32
xloc = 440
yloc = 20
NOMAINWIN
WindowWidth = 515 : WindowHeight = 303
UpperLeftX = INT((DisplayWidth-WindowWidth)/2)
UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
graphicbox #main.gfx, 10, 10, 480, 210
button #main.go, "Go!",[go],UL, 385, 230, 105, 25
Open "Window Title" for Window as #main
#main "trapclose [quit]"
#main.gfx "down; fill White; flush"
#main "font ms_sans_serif 10"
[loop]
Wait
[quit]
close #main : END
[go]
#main.gfx "color white"
timer 50 , [move]
wait
[move]
oldx = xloc
oldy = yloc
xloc = xloc + xchg
yloc = yloc + ychg
#main.gfx "backcolor white"
#main.gfx "up; goto ";oldx;" ";int(oldy);"; down; circlefilled 10"
#main.gfx "backcolor red"
#main.gfx "up; goto ";xloc;" ";int(yloc);"; down; circlefilled 8"
if yloc < 2 or yloc > 208 then
ychg = ychg * -1
end if
wait
Introduction | Let's Get Drawing | Follow the bouncing ball | Getting Control! | Appendix A | Appendix B